import lombok.var;

import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * @author CHENTAIWEN
 * @create 2022/9/15 15:37
 */
public class ListMAP {
    public static void main(String[] args) {
        List<Map<String, Object>> ListEntry = new ArrayList<>();
        Map<String, Object> Entry = new HashMap<>();
        Entry.put("name","war3");
        Entry.put("value","whos");
        ListEntry.add(Entry);
        String name="war3";
        String value="your";
        Boolean flag=true;
        for (var entry : ListEntry) {
            if (entry.get("name").equals(name)) {
                String name1 = (String) entry.get("value");
                String value1 = name1 + value;
                entry.put("value", value1);
                flag=false;
            }
        }
        if (flag) {
            Map<String, Object> Entry1 = new HashMap<>();
            Entry1.put("name",name);
            Entry1.put("value",value);
            ListEntry.add(Entry1);
        }
        System.out.println(ListEntry);
    }
}
